{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS Example with HP8753D" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is the example notebook illustrating how to use the QCoDeS driver for the HP 8753D Network Analyzer.\n", "\n", "Throughout the notebook, we assume that a Mini-Circuits SLP-450+ Low Pass filter is connected as the DUT. The test setup is as the following picture:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![title](../files/HP8753D.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Required imports" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import time\n", "\n", "from qcodes.dataset import do0d, do1d\n", "from qcodes.instrument_drivers.HP import HP8753D" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Connecting to the instrument and running the testHP8753D" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: HEWLETT PACKARD 8753D (serial:0, firmware:6.14) in 0.22s\n" ] } ], "source": [ "vna = HP8753D(\"vna\", \"GPIB0::15::INSTR\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For the sake of this tutorial, we reset the instrument" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "vna.reset()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's look at the current snapshot of the instrument:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "vna:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "IDN :\t{'vendor': 'HEWLETT PACKARD', 'model': '8753D', 'serial'...\n", "averaging :\tOFF \n", "display_format :\tLog mag \n", "display_reference :\t0 (dB)\n", "display_scale :\t10 (dB)\n", "number_of_averages :\t16 \n", "output_power :\t0 (dBm)\n", "s_parameter :\tS11 \n", "start_freq :\t30000 (Hz)\n", "stop_freq :\t6e+09 (Hz)\n", "sweep_time :\t0.175 (s)\n", "timeout :\t10 (s)\n", "trace :\tNot available \n", "trace_points :\t201 \n" ] } ], "source": [ "vna.print_readable_snapshot(update=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We setup the test such as the low-pass filter is connecting Port 1 to Port2. Let's setup the trace of S21 with 10 averages with a frequency range from 100 kHz to 1 GHz on a linear scale. Then, the instrument settings are as below:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "vna.display_format(\"Lin mag\")\n", "vna.s_parameter(\"S21\")\n", "vna.start_freq(100e3)\n", "vna.stop_freq(1e9)\n", "\n", "# and let's adjust the y-scale to fit\n", "vna.display_scale(0.12)\n", "vna.display_reference(-0.1)\n", "\n", "# and finally enable averaging\n", "vna.averaging(\"ON\")\n", "vna.number_of_averages(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Single trace measurement" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we aquire a single trace. Before each aqcuisition, we must run prepare_trace for the instrument trace:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Starting experimental run with id: 163. \n" ] }, { "data": { "text/plain": [ "(results #163@C:\\Users\\QCoDeS_Public\\experiments.db\n", " --------------------------------------------------\n", " vna_Frequency - array\n", " vna_trace - array,\n", " [],\n", " [None])" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEWCAYAAACNJFuYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3dd5hU5dnH8e9vZpddygICi0jvSAnNFSyoGBtqbIm9d40lJhpLurEkeRM1Nkzktb32HjVKghVFLDRBRUSQLtJ73Xa/f5yzOmydhZ05W+7Pdc01p5/7O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OwtlBDwB3A5MTajmJZgE9E/r/CvwmvMtoiSaVrPs7kn4EHAb8rNTw1sBKMytIZjmuYfOag6tXzOz18Af1w7CNeBNwpplNk/QMMB1YSHAsvsRtwLOSzgLeThj+AMHhomnhYZqVwPGVrDtf0inAPZIaE9QGDgU2mdlUSRuA0v/kS+b9UlKLkkM+ZvaZpKuAR8NktprgLKU/JLEZrgHaA5PCbfBK2A5xMMGT0pyrkt+V1TVIkm4k+NGuqtG3ptbXHhgP7FnRE8ok/QLYaGYPlDe+BmJ4EfiVmc1OxfJd/eKHlZxLMUlnAx8Dv6ni0ZX/YMe2jJqMoRHwkicGlyyvOTjnnCvDaw7OOefK8OTgnHOuDE8OzjnnyvDk4JxzrgxPDs4558r4f2YIjQZu7PW0AAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "vna.trace.prepare_trace()\n", "do0d(vna.trace)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Acquiring traces while sweeping" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we will vary the output power and acquire a trace for each power to examine how applying more power reduces the measurement noise.\n", "We have to ensure that the vna finishes averaging before moving to the next power step. Therefore, we setup a function to do this average and pass it to our measurement setup (note that this function can be implemented in several different ways)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "n_avgs = 10\n", "vna.number_of_averages(n_avgs)\n", "\n", "\n", "def run_sweeper():\n", " vna.run_N_times(n_avgs)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We prepare our trace and run the sweep and time it:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Starting experimental run with id: 164. \n" ] }, { "data": { "text/plain": [ "72.79213905334473" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" }, { "data": {}, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "vna.trace.prepare_trace()\n", "t1 = time.time()\n", "do1d(vna.output_power, -84, -40, 20, 0.1, run_sweeper, vna.trace)\n", "t2 = time.time()\n", "t2 - t1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "n_avgs can be changed between 1 and 999 (the higher average, more detailed result and longer time to finish)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "vna.close()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 4 }